<%@ page contentType="text/html" pageEncoding="UTF-8"%>
    
<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %> 
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<h3><bean:message key="content.trips" /></h3>
<html:form action="/saveProposalVsDriver">
	
<table width="100%" border="1" cellpadding="2" cellspacing="2" align="center">
   <tr> 
    <td width="800" valign="top">
    <c:forEach var="dev" items="${trips}">
	<html:radio name="SaveProposalVSDriverForm" property="tripId" value="${dev.id}">
	<html:text name="LoginForm" property="id" value="${dev.id}"/>
		<input width="50" type="text" name="name" value="${dev.name}">
		<input width="50" type="text" name="from" value="${dev.from}">
		<input width="50" type="text" name="to"   value="${dev.to}"  >
		<c:if test="${dev.driver != null}">
			<input type="text" name="driverName" value="${dev.driver.name}">
		</c:if>
		</html:radio>
	<br/>
	</c:forEach></td>
    <td valign="top">
    <c:forEach var="driver" items="${drivers}">
    <html:radio name="SaveProposalVSDriverForm" property="driverId" value="${driver.id}">
	<html:text name="LoginForm" property="id" value="${driver.id}"/>
		<input type="text" name="name" value="${driver.name}">
		<input type="text" name="from" value="${driver.surname}">
		</html:radio>
		<br/>
	</c:forEach>
	</td>
   </tr>
 </table>
 	<div style="color:red">
 		<html:errors property="daoException"/></div>
 		<div style="color:red">
    	<html:errors property="errorDriver"/></div>
    	<div style="color:red">
    	<html:errors property="errorTrip"/></div>
	<html:submit value="Save"></html:submit>
</html:form>
	